package com.jingtao.product.mapper;

import com.jingtao.product.domain.DTO.ProductAttributeCategoryExample;
import com.jingtao.product.domain.DTO.ProductAttributeExample;
import com.jingtao.product.domain.ProductAttribute;
import com.jingtao.product.domain.ProductAttributeCategory;
import com.jingtao.product.domain.request.ProductAttrRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName:
 * @Description:
 * @Author: zengfanzhen
 * @Date: 2024/4/1 20:09:00
 */
@Mapper
public interface ProductAttributeMapper {

    long countByExample(ProductAttributeExample example);

    int deleteByExample(ProductAttributeExample example);

    int deleteByPrimaryKey(Long id);

    int insert(ProductAttribute record);

    int insertSelective(ProductAttribute record);

//    List<ProductAttribute> selectByExample(ProductAttributeExample example);

    ProductAttribute selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") ProductAttribute record, @Param("example") ProductAttributeExample example);

    int updateByExample(@Param("record") ProductAttribute record, @Param("example") ProductAttributeExample example);

    int updateByPrimaryKeySelective(ProductAttribute record);

    int updateByPrimaryKey(ProductAttribute record);


    /**
     * 获取所有商品属性分类
     * @return
     */
    List<ProductAttributeCategory> getAllProductAttrCategory(ProductAttrRequest productAttrRequest);


    List<ProductAttribute> selectByExample(ProductAttributeExample example);

    List<ProductAttributeCategory> selectCateByExample(ProductAttributeCategoryExample productAttributeCategoryExample);

}
